#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main31()
{
	int n = 0;
	scanf("%d", &n);
	while (n)
	{
		printf("%d", n % 10);
		n=n / 10;
	}


	//1234%10=4
	/*1234/10=123

		123%10=3
		123/10=12

		12%10=2
		12/10=1

		1%10=1
		1/10=0*/











	return 0;
}